package com.intelligent.system.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.intelligent.system.auth.entity.Contact;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 联系人Mapper接口
 */
@Mapper
public interface ContactMapper extends BaseMapper<Contact> {
    
    /**
     * 根据组织机构ID查询联系人列表
     */
    @Select("SELECT * FROM sys_contact WHERE organization_id = #{organizationId}")
    List<Contact> selectByOrganizationId(@Param("organizationId") Long organizationId);

    /**
     * 根据手机号码查询联系人
     */
    @Select("SELECT * FROM sys_contact WHERE mobile = #{mobile}")
    Contact selectByMobile(@Param("mobile") String mobile);
} 